package cabbage.model.logic;

import java.sql.SQLException;
import java.util.List;

import cabbage.beans.InventoryBean;
import cabbage.database.idao.IPlayerDAO;
import cabbage.database.operations.PlayerDAO;
import cabbage.logic.i.IPlayerInfo;

public class PlayerInfo implements IPlayerInfo {
	
	private IPlayerDAO player;
	
	public PlayerInfo() {
		
	}
	
	/* (non-Javadoc)
	 * @see cabbage.model.logic.IPlayerInfo#getAllPlayerCollectibles(int)
	 */
	@Override
	public List<InventoryBean> getAllPlayerCollectibles(int playerid) throws SQLException {
		player = new PlayerDAO();
		if (!player.checkPlayeridExists(playerid)) return null;
		return player.getPlayerInventory(playerid);
	}

}
